package com.headwind.logistics.logistics.mapper;

import com.headwind.logistics.common.pojo.Address;
import com.headwind.logistics.common.pojo.Coupon;
import com.headwind.logistics.common.pojo.Customer;
import com.headwind.logistics.common.pojo.PutSendInfo;
import com.headwind.logistics.logistics.pojo.LogiPreRecordedReceipt;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 小恶魔
 * @Date 2020-07-20 10:31
 * @Version 1.0
 * @DESCRIPTION 员工接口映射层
 */
public interface LogisticsCustomerMapper {

    /**
     * 客户登录
     * @param customer
     * @return
     */
    Customer customerLogin(Customer customer);

    /**
     * 根据顾客id获取优惠卷
     * @param customerId
     * @return
     */
    List<Coupon> queryCouponByCustomerId(@Param("type") Integer type,@Param("customerId") Long customerId);

    /**
     * 根据顾客id获取地址
     * @param customerId
     * @return
     */
    List<Address> queryAddressByCustomerId(@Param("customerId") Long customerId,@Param("page")Integer page,@Param("rows")Integer rows);

    /**
     * 添加收寄人信息
     * @param putSendInfo
     * @return
     */
    Integer addPutSendInfo(PutSendInfo putSendInfo);

    /**
     * 添加预录单
     * @param logiPreRecordedReceipt
     * @return
     */
    Integer addPreRecordedReceipt(LogiPreRecordedReceipt logiPreRecordedReceipt);

    /**
     * 修改优惠卷状态
     * @param couponId
     * @return
     */
    Integer updateCouponById(Long couponId);
}
